package com.tencreat.domain.mall;

import cn.hutool.extra.spring.SpringUtil;
import com.tencreat.service.system.ISysDictDataService;

/**
 * 字典基础类
 *
 * @author zixin
 */
public class BaseDictSetting<T> {

    public T select() {
        ISysDictDataService sysDictDataService = SpringUtil.getBean(ISysDictDataService.class);
        return sysDictDataService.getObjectData((Class<T>) getClass());
    }

    public void update() {
        ISysDictDataService sysDictDataService = SpringUtil.getBean(ISysDictDataService.class);
        sysDictDataService.updateObjectData(this);
    }

}
